package com.sanjiahantang.youjiaclient.module.goods.presenters;

import android.content.Context;

import com.sanjiahantang.youjiaclient.base.BaseMvpActivity;
import com.sanjiahantang.youjiaclient.base.BaseMvpPresenter;
import com.sanjiahantang.youjiaclient.base.BaseView;
import com.sanjiahantang.youjiaclient.base.CallBack;
import com.sanjiahantang.youjiaclient.config.ConfigValue;
import com.sanjiahantang.youjiaclient.module.common.beans.StringBean;
import com.sanjiahantang.youjiaclient.module.goods.views.GoodsView;
import com.sanjiahantang.youjiaclient.module.me.order.models.IOrderModel;
import com.sanjiahantang.youjiaclient.module.me.order.models.impl.OrderModel;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zy on 2017/12/8.
 */

public class ReduceMoneyPresenter extends BaseMvpPresenter<GoodsView> {
    private IOrderModel orderModel;

    public ReduceMoneyPresenter(){
        orderModel = new OrderModel();
    }

    public void findOrderGoodsForOrderCode(Context context, String orderRecordCode, BaseView.OnLoadListener listener) {
        Map<String,String> param = new HashMap<>();
        param.put(KEY_TOKEN, ConfigValue.DATA_KEY);
        param.put("orderCode",orderRecordCode);
        orderModel.findOrderGoodsForOrderCode(context,param, new CallBack<StringBean>() {
            @Override
            public void onSuccess(StringBean response, Context context, Object tag) {

            }

            @Override
            public void onFailure(String message) {

            }
        });
    }
}
